{% if pages %}
<div class="pagination">
    {% for page in pages %}
        <span>
            <a href="{{ page.url }}" title="{{ page.title }}" class="{% if page.is_current_page %}active current{% endif %}">
                {{ page.num }}
            </a>
        </span>
    {% endfor %}
</div>
{% endif %}